package com.project.webpage.controller;


import com.project.webpage.aop.TagLog;
import com.project.webpage.dto.SearchByRqParam;
import com.project.webpage.service.LdxxService;
import com.project.webpage.util.RestResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/webpage/ldxx/")
public class LdxxController extends BaseController {

    @Resource
    LdxxService ldxxService;

    /**
     * 指定线路企业电子路单出车数详细查询
     */
    @PostMapping("pc/jgxlid/detail")
    @TagLog(operation = 0, content = "查询指定线路企业电子路单出车数详细详细")
    public RestResult pcDetailByJgxlid(@RequestBody SearchByRqParam param) {
        this.getPage(false, param);
        return RestResult.ok(ldxxService.getPcListByJgxlidForPage(param));
    }

    /**
     * 指定线路企业电子路单班次数详细查询
     */
    @PostMapping("bc/jgxlid/detail")
    @TagLog(operation = 0, content = "查询指定线路企业电子路单班次数详细详细")
    public RestResult bcDetailByJgxlid(@RequestBody SearchByRqParam param) {
        this.getPage(false, param);
        return RestResult.ok(ldxxService.getBcListByJgxlidForPage(param));
    }
}
